When GNOME shell runs on a less memory system (for example 3 GB RAM), it
is usually killed by the kernel OOM-killer easily. Because, it has a
higher OOM score. However, GNOME desktop environment cannot do anything
when the GNOME shell is killed.
This commit adjusts and lowers down gnome-shell process' OOM score to
avoid being killed by the kernel OOM-killer too early. In other words,
sacrifices other processes first.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2582>
Restart=no
# Kill any stubborn child processes after this long
TimeoutStopSec=5
+
+# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early
+OOMScoreAdjust=-1000
RestartSec=0ms
# Kill any stubborn child processes after this long
TimeoutStopSec=5
+
+# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early
+OOMScoreAdjust=-1000